<template>
  <el-form
    ref="qmGenForm1"
    :model="models"
    :rules="rules"
    :disabled="disabled"
    label-width="100px"
    class="qm-gen-form"
  >
    <el-row>
      <el-col :span="12">
        <el-form-item label="APP应用：" prop="model.appId">
          <el-select v-model="models.model.appId">
            <el-option
              v-for="app in controlData.apps"
              :key="app.appId"
              :value="app.appId"
              :label="`${app.appName} ( ${app.appCode} )`"
            />
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="模块路径：" prop="model.moduleUrl">
          <el-input v-model="models.model.moduleUrl" />
        </el-form-item>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="12">
        <el-form-item label="模块名称：" prop="model.moduleName">
          <el-input v-model="models.model.moduleName" />
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="是否删除：" prop="model.isDeleted">
          <el-switch v-model="models.model.isDeleted" />
        </el-form-item>
      </el-col>
    </el-row>

    <el-row>
      <el-col :span="24">
        <el-form-item label="备注：" prop="model.memo">
          <el-input v-model="models.model.memo" type="textarea" />
        </el-form-item>
      </el-col>
    </el-row>
  </el-form>
</template>

<script>
export default {
  name: 'MobileMobileModuleCreate',
  props: [
    'models',
    'controlData',
    'pageAction',
    'defaults',
    'disabledButtons',
    'enums',
    'initMessage',
    'primaryKey',
    'urls',
    'disabled'
  ],
  data() {
    return {
      rules: {
        'model.appId': [
          {
            required: true,
            message: '这是必填字段',
            trigger: 'blur'
          }
        ],
        'model.moduleUrl': [
          {
            required: true,
            message: '这是必填字段',
            trigger: 'blur'
          }
        ],
        'model.moduleName': [
          {
            required: true,
            message: '这是必填字段',
            trigger: 'blur'
          }
        ],
        'model.isDeleted': [
          {
            required: true,
            message: '这是必填字段',
            trigger: 'blur'
          }
        ]
      }
    }
  },
  methods: {}
}
</script>

<style scoped></style>
